const express = require('express');

const app = express();

app.all('/jquery-jsonp-server',(request,response)=>{
    const data = {
        name:'mannoname',
        city:['杭州','台州','北京']
    }
    let str = JSON.stringify(data);
    // 接收callback参数
    let cb = request.query.callback;
    response.end(`${cb}(${str})`);
})

app.listen(8000,()=>{
    console.log('服务器已启动');
});